VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "clsLoadFormBXML"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
'*-----------------------------------------------------------------------
'* Method:      SaveFormB
'* Parameters:  strFld - string passed into function to be broken up and validated
'* Returns:     Nothing if validation passes, message if not
'* Description: Validates data for a form B submission
'*-----------------------------------------------------------------------

'-----------------------------------------------------------------------
'Updates
'Changed on     Changed by      Change details
'20060420       Johann          This function is a duplicate of the one in clsLoadFormB
'-----------------------------------------------------------------------

Public Function SaveFormB(ByVal fun_id As String, ByVal Username As String, ByVal fund_number As String, ByVal scod_no_it_no_rsn As String, ByVal no_it_no_text As String, ByVal income_tax_reference_number As String, _
                          ByVal rsa_id_number As String, ByVal other_id_number As String, ByVal surname As String, ByVal initials As String, _
                          ByVal firstnames As String, ByVal Birth As String, ByVal addresses_equal As String, _
                          ByVal post_addr_l1 As String, ByVal post_addr_l2 As String, ByVal post_addr_l3, ByVal post_addr_l4, ByVal post_Postal_code As String, _
                          ByVal home_addr_l1 As String, ByVal home_addr_l2 As String, ByVal home_addr_l3, ByVal home_addr_l4, ByVal home_postal_code As String, _
                          ByVal fund_name As String, ByVal dialing_code As String, ByVal telephone_number As String, ByVal contact_person As String, _
                          ByVal f_post_addr_l1 As String, ByVal f_post_addr_l2 As String, ByVal f_post_addr_l3, ByVal f_post_addr_l4, ByVal f_post_postal_code As String, _
                          ByVal joindate As String, ByVal annual_salary As String, ByVal GROSS_LUMP_SUM As String, ByVal tax_year As String, ByVal policy_number As String, _
                          ByVal accrualdate As String, ByVal scod_fund_type As String, ByVal scod_fund_create_rsn As String, ByVal scod_req_rsn As String, _
                          ByVal xfer_to_fund_yn As String, ByVal xfer_to_fund_number As String, ByVal xfer_to_fund_type As String, ByVal xfer_to_fund_name As String, _
                          ByVal xfer_amt As String, ByVal email_to As String, ByVal nTotalProvidentContr As String, ByVal nExcessPensionContr As String, _
                          ByVal nProvidentIncPensionContr As String, ByVal nSurrenderValue As String, ByVal dtDateFrom As String, ByVal dtDateTo As String, ByVal nEmployeeNo As String, _
                          ByRef req_seq_num As String) As String

        
    Err.Raise vbObjectError + 1, "KeyTax.clsLoadFormBXML.SaveFormB", "This function is obsolete and should not be used anymore. Please use clsLoadFormB.SaveFormB"

'    Dim cmd As ADODB.Command
'
'    Dim cnSaveFormB As ADODB.Connection
'
'    Dim strSQL
'
'
'    Dim parm As ADODB.Parameter
'
'    Set cnSaveFormB = New ADODB.Connection
'
'
'    Set cmd = CreateObject("ADODB.COMMAND")
'
'    With cnSaveFormB
'        .ConnectionString = GetConnectionString() 'Johann (20090625): Centralised code for connection string added
'        .Open
'    End With
'
'
'    cmd.CommandText = "dir_load_form_b"
'    cmd.CommandType = adCmdStoredProc
'    cmd.ActiveConnection = cnSaveFormB
'
'
'        cmd.Parameters.Append cmd.CreateParameter("fun_id", adDouble, adParamInput, , IIf(fun_id = "", Null, fun_id))
'
'        cmd.Parameters.Append cmd.CreateParameter("username", adVarChar, adParamInput, 10, IIf(Username = "", Null, Username))
'
'        cmd.Parameters.Append cmd.CreateParameter("fund_number", adDouble, adParamInput, , IIf(fund_number = "", Null, fund_number))
'
'        cmd.Parameters.Append cmd.CreateParameter("no_it_no_rsn_code", adVarChar, adParamInput, 2, IIf(scod_no_it_no_rsn = "", Null, scod_no_it_no_rsn))
'        cmd.Parameters.Append cmd.CreateParameter("no_it_no_text", adVarChar, adParamInput, 65, IIf(no_it_no_text = "", Null, no_it_no_text))
'        cmd.Parameters.Append cmd.CreateParameter("income_tax_reference_number", adDouble, adParamInput, , IIf(income_tax_reference_number = "", Null, income_tax_reference_number))
'
'        cmd.Parameters.Append cmd.CreateParameter("rsa_id_number", adDouble, adParamInput, , IIf(rsa_id_number = "", Null, rsa_id_number))
'
'        cmd.Parameters.Append cmd.CreateParameter("other_id_number", adVarChar, adParamInput, 15, IIf(other_id_number = "", Null, other_id_number))
'        cmd.Parameters.Append cmd.CreateParameter("surname", adVarChar, adParamInput, 120, IIf(surname = "", Null, surname))
'        cmd.Parameters.Append cmd.CreateParameter("initials", adVarChar, adParamInput, 5, IIf(initials = "", Null, initials))
'        cmd.Parameters.Append cmd.CreateParameter("firstnames", adVarChar, adParamInput, 90, IIf(firstnames = "", Null, firstnames))
'
'        cmd.Parameters.Append cmd.CreateParameter("birthdate", adVarChar, adParamInput, 10, IIf(Birth = "", Null, Birth))
'        'cmd.Parameters.Append cmd.CreateParameter("birthdate", adDBTimeStamp, adParamInput, , IIf(Birth = "", Null, Birth))
'
'        cmd.Parameters.Append cmd.CreateParameter("addresses_equal ", adVarChar, adParamInput, 1, IIf(addresses_equal = "", Null, addresses_equal))
'        cmd.Parameters.Append cmd.CreateParameter("post_addr_l1", adVarChar, adParamInput, 35, IIf(post_addr_l1 = "", Null, post_addr_l1))
'        cmd.Parameters.Append cmd.CreateParameter("post_addr_l2", adVarChar, adParamInput, 35, IIf(post_addr_l2 = "", Null, post_addr_l2))
'        cmd.Parameters.Append cmd.CreateParameter("post_addr_l3", adVarChar, adParamInput, 35, IIf(post_addr_l3 = "", Null, post_addr_l3))
'        cmd.Parameters.Append cmd.CreateParameter("post_addr_l4", adVarChar, adParamInput, 35, IIf(post_addr_l4 = "", Null, post_addr_l4))
'        cmd.Parameters.Append cmd.CreateParameter("post_Postal_code", adVarChar, adParamInput, 10, IIf(post_Postal_code = "", Null, post_Postal_code))
'        cmd.Parameters.Append cmd.CreateParameter("home_addr_l1", adVarChar, adParamInput, 35, IIf(home_addr_l1 = "", Null, home_addr_l1))
'        cmd.Parameters.Append cmd.CreateParameter("home_addr_l2", adVarChar, adParamInput, 35, IIf(home_addr_l2 = "", Null, home_addr_l2))
'        cmd.Parameters.Append cmd.CreateParameter("home_addr_l3", adVarChar, adParamInput, 35, IIf(home_addr_l3 = "", Null, home_addr_l3))
'        cmd.Parameters.Append cmd.CreateParameter("home_addr_l4", adVarChar, adParamInput, 35, IIf(home_addr_l4 = "", Null, home_addr_l4))
'        cmd.Parameters.Append cmd.CreateParameter("home_postal_code", adVarChar, adParamInput, 5, IIf(home_postal_code = "", Null, home_postal_code))
'
'        cmd.Parameters.Append cmd.CreateParameter("fund_name", adVarChar, adParamInput, 120, IIf(fund_name = "", Null, fund_name))
'        cmd.Parameters.Append cmd.CreateParameter("dialing_code", adVarChar, adParamInput, 10, IIf(dialing_code = "", Null, dialing_code))
'        cmd.Parameters.Append cmd.CreateParameter("telephone_number", adVarChar, adParamInput, 10, IIf(telephone_number = "", Null, telephone_number))
'        cmd.Parameters.Append cmd.CreateParameter("contact_person", adVarChar, adParamInput, 120, IIf(contact_person = "", Null, contact_person))
'
'        cmd.Parameters.Append cmd.CreateParameter("f_post_addr_l1", adVarChar, adParamInput, 35, IIf(f_post_addr_l1 = "", Null, f_post_addr_l1))
'        cmd.Parameters.Append cmd.CreateParameter("f_post_addr_l2", adVarChar, adParamInput, 35, IIf(f_post_addr_l2 = "", Null, f_post_addr_l2))
'        cmd.Parameters.Append cmd.CreateParameter("f_post_addr_l3", adVarChar, adParamInput, 35, IIf(f_post_addr_l3 = "", Null, f_post_addr_l3))
'        cmd.Parameters.Append cmd.CreateParameter("f_post_addr_l4", adVarChar, adParamInput, 35, IIf(f_post_addr_l4 = "", Null, f_post_addr_l4))
'        cmd.Parameters.Append cmd.CreateParameter("f_post_postal_code", adVarChar, adParamInput, 10, IIf(f_post_postal_code = "", Null, f_post_postal_code))
'
'        cmd.Parameters.Append cmd.CreateParameter("fund_join_date", adDBTimeStamp, adParamInput, , IIf(joindate = "", Null, joindate))
'
'        cmd.Parameters.Append cmd.CreateParameter("annual_salary", adDouble, adParamInput, , IIf(annual_salary = "", Null, annual_salary))
'        cmd.Parameters.Append cmd.CreateParameter("gross_lump_sum", adDouble, adParamInput, , IIf(gross_lump_sum = "", Null, gross_lump_sum))
'        cmd.Parameters.Append cmd.CreateParameter("tax_year", adDouble, adParamInput, , IIf(tax_year = "", Null, tax_year))
'
'        cmd.Parameters.Append cmd.CreateParameter("policy_number", adVarChar, adParamInput, 15, IIf(policy_number = "", Null, policy_number))
'
'        cmd.Parameters.Append cmd.CreateParameter("employee_number", adVarChar, adParamInput, 15, IIf(nEmployeeNo = "", Null, nEmployeeNo))
'
'        cmd.Parameters.Append cmd.CreateParameter("accrual_date", adDBTimeStamp, adParamInput, , IIf(accrualdate = "", Null, accrualdate))
'
'        cmd.Parameters.Append cmd.CreateParameter("fund_type_code", adVarChar, adParamInput, 2, IIf(scod_fund_type = "", Null, scod_fund_type))
'        cmd.Parameters.Append cmd.CreateParameter("fund_create_rsn_code", adVarChar, adParamInput, 2, IIf(scod_fund_create_rsn = "", Null, scod_fund_create_rsn))
'        cmd.Parameters.Append cmd.CreateParameter("scod_req_rsn_code", adVarChar, adParamInput, 2, IIf(scod_req_rsn = "", Null, scod_req_rsn))
'
'
'        cmd.Parameters.Append cmd.CreateParameter("total_contrib", adDouble, adParamInput, , IIf(nTotalProvidentContr = "", Null, nTotalProvidentContr))
'        cmd.Parameters.Append cmd.CreateParameter("excess_pension_contrib", adDouble, adParamInput, , IIf(nExcessPensionContr = "", Null, nExcessPensionContr))
'        cmd.Parameters.Append cmd.CreateParameter("contrib_to_prev_prov_fund", adDouble, adParamInput, , IIf(nProvidentIncPensionContr = "", Null, nProvidentIncPensionContr))
'
'        cmd.Parameters.Append cmd.CreateParameter("calc_fund_start_date", adDBTimeStamp, adParamInput, , IIf(dtDateFrom = "", Null, dtDateFrom))
'        cmd.Parameters.Append cmd.CreateParameter("calc_fund_end_date", adDBTimeStamp, adParamInput, , IIf(dtDateTo = "", Null, dtDateTo))
'
'        cmd.Parameters.Append cmd.CreateParameter("surrender_value", adDouble, adParamInput, , IIf(nSurrenderValue = "", Null, nSurrenderValue))
'
'        cmd.Parameters.Append cmd.CreateParameter("xfer_to_fund_yn", adVarChar, adParamInput, 1, IIf(xfer_to_fund_yn = "", Null, xfer_to_fund_yn))
'
'        cmd.Parameters.Append cmd.CreateParameter("xfer_to_fund_number", adVarChar, adParamInput, 50, IIf(xfer_to_fund_number = "", Null, xfer_to_fund_number))
'
'        cmd.Parameters.Append cmd.CreateParameter("xfer_to_fund_type_code", adVarChar, adParamInput, 2, IIf(xfer_to_fund_type = "", Null, xfer_to_fund_type))
'        cmd.Parameters.Append cmd.CreateParameter("xfer_to_fund_name", adVarChar, adParamInput, 120, IIf(xfer_to_fund_name = "", Null, xfer_to_fund_name))
'
'        cmd.Parameters.Append cmd.CreateParameter("xfer_amt", adDouble, adParamInput, , IIf(xfer_amt = "", Null, xfer_amt))
'
'        cmd.Parameters.Append cmd.CreateParameter("email_to", adVarChar, adParamInput, 80, IIf(email_to = "", Null, email_to))
'
'        cmd.Parameters.Append cmd.CreateParameter("req_seq_num", adDouble, adParamOutput)
'
'    On Error Resume Next
'    Dim nRecords As Long
'    cmd.Execute (nRecords)
'
'
'    Select Case Err.Number
'        Case 0
'            SaveFormB = "Request " & cmd.Parameters("req_seq_num") & " " & "Successfully saved."
'        Case Else
'            SaveFormB = "WARNING: Your request has NOT been saved.  Please re-submit your request. <br><br><b>Error Information</b> <br><br> Error Number: " & Err.Number & " <br><br> Error description: <br>" & Err.Description & ""
'    End Select
'
'    req_seq_num = cmd.Parameters("req_seq_num")
'
''clean up
'cnSaveFormB.Close
'Set cnSaveFormB = Nothing

End Function

